package com.coocaa.app.lib.cleaner.mgr;

import com.coocaa.app.lib.cleaner.deleter.AbstractDeleter;

/**
 * Created by lu on 17-4-11.
 */

public interface Cleaner extends DataLoader, AbstractDeleter.DeleterLoader {
    public static final long SIZE_GATE = 64 * 1024;

    interface CleanerListener extends DataHolder.DataHolderListener {
        void onScanStart();

        void onScanEnd();

        void onCleanAllStart();

        void onCleanAllEnd(long size);
    }

    void cleanAll();

    long clearAllApkRubbish();

    long clearAllPackageData();

    long clearAllPackageCache();

    long clearAllOtherData();

    /**
     * 卸载time天内未使用过的应用
     */
    void unInstallApp(int time);

    /**
     * 获取后台命令，返回值为 天数
     * 若返回值为-1，说明此命令无效
     */
    int getServerCommand();

    /**
     * 当卸载和清理垃圾完成的时候执行此操作
     */
    void resetCommandSuccess();

    public interface OnAutoUninstallSuccessListener {
        void AutoUninstallSuccess(boolean success);
    }
    void setOnAutoUninstallSuccessListener(Cleaner.OnAutoUninstallSuccessListener listener);

    void setCleanerListener(CleanerListener listener);

    void startScan();

    void stopScan();
}
